package cn.com.blueInfo.bpm.person.enums;

import cn.com.blueInfo.bpm.common.enums.BaseEnum;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 多因素认证状态
 * @author suxch
 * @since 2025-08-28 22:06:38
 */
@Getter
@AllArgsConstructor
public enum UserAccountMfaStatus implements BaseEnum<Integer> {

    /** 多因素认证状态-未开启 */
    NOT_ENABLED(0, "未开启"),
    /** 多因素认证状态-已开启 */
    ENABLED(1, "已开启");

    @EnumValue
    private final Integer code;

    @JsonValue
    private final String desc;

    public static UserAccountMfaStatus getByCode(Integer code) {
        return BaseEnum.getByCode(UserAccountMfaStatus.class, code);
    }

    @JsonCreator
    public static UserAccountMfaStatus getByName(String name) {
        return BaseEnum.getByName(name, UserAccountMfaStatus.class);
    }

}
